<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1"><title id="dk20941">DROP TRIGGER</title><body><p id="sql_command_desc">Removes a trigger.</p><section id="section2"><title>Synopsis</title><codeblock id="sql_command_synopsis">DROP TRIGGER [IF EXISTS] <varname>name</varname> ON <varname>table</varname> [CASCADE | RESTRICT]</codeblock></section><section id="section3"><title>Description</title><p><codeph>DROP TRIGGER</codeph> will remove an existing trigger definition.
To run this command, the current user must be the owner of the table
for which the trigger is defined.</p></section><section id="section4"><title>Parameters</title><parml><plentry><pt>IF EXISTS</pt><pd>Do not throw an error if the trigger does not exist. A notice is
issued in this case.</pd></plentry><plentry><pt><varname>name</varname></pt><pd>The name of the trigger to remove.</pd></plentry><plentry><pt><varname>table</varname></pt><pd>The name (optionally schema-qualified) of the table for which the
trigger is defined.</pd></plentry><plentry><pt>CASCADE</pt><pd>Automatically drop objects that depend on the trigger.</pd></plentry><plentry><pt>RESTRICT</pt><pd>Refuse to drop the trigger if any objects depend on it. This is the
default.</pd></plentry></parml></section><section id="section5"><title>Examples</title><p>Remove the trigger <codeph>sendmail</codeph> on table <codeph>expenses</codeph>;</p><codeblock>DROP TRIGGER sendmail ON expenses;</codeblock></section><section id="section6"><title>Compatibility</title><p>The <codeph>DROP TRIGGER</codeph> statement in Greenplum Database is not compatible with the SQL
        standard. In the SQL standard, trigger names are not local to tables, so the command is
        simply <codeph>DROP TRIGGER <varname>name</varname></codeph>.</p></section><section id="section7"><title>See Also</title><p><codeph><xref href="ALTER_TRIGGER.xml#topic1" type="topic" format="dita"/></codeph>,
            <codeph><xref href="CREATE_TRIGGER.xml#topic1" type="topic" format="dita"/></codeph></p></section></body></topic>
